import request from "@/utils/request";

// 查询检验方法列表
export function listQcinspectmethod(query) {
  return request({
    url: "/mes/qc/qcinspectmethod/list",
    method: "get",
    params: query,
  });
}

// 查询检验方法详细
export function getQcinspectmethod(id) {
  return request({
    url: "/mes/qc/qcinspectmethod/" + id,
    method: "get",
  });
}

//同步检验方法数据
// export function getJdyQcinspectmethod(query) {
//   return request({
//     url: "/mes/k3cloud/api/inspectionMethod/syncinspectionMethod",
//     method: "get",
//     params: query,
//   });
// }

export function getJdyQcinspectmethod(query) {
  return request({
    url: "/sync/k3cloud/api/qcQmInspectmethodSync/qcQmInspectmethodSync",
    method: "get",
    params: query,
  });
}

// 新增检验方法
export function addQcinspectmethod(data) {
  return request({
    url: "/mes/qc/qcinspectmethod",
    method: "post",
    data: data,
  });
}

// 修改检验方法
export function updateQcinspectmethod(data) {
  return request({
    url: "/mes/qc/qcinspectmethod",
    method: "put",
    data: data,
  });
}

// 删除检验方法
export function delQcinspectmethod(id) {
  return request({
    url: "/mes/qc/qcinspectmethod/" + id,
    method: "delete",
  });
}
